package com.jason.system.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @author jie
 * @version 1.0
 * success come from self-discipline
 * @date 2021/3/17 11:58
 * 类：完成工单
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ExcelTarget("SolveOrderEntity")
public class SolveOrder implements Serializable {

  private Integer solveId;

  private Integer oId;

  private Integer mId;

  /**
   * order(关联)
   */
  @ExcelEntity(id ="o",name = "派单信息")
  private Order order;

  /**
   * 登记人
   */
  @Excel(name = "登记人")
  private String register;

  /**
   * 解决时间
   */
  @Excel(name = "处理时间（解决）（年/月/日 时：分）",exportFormat = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
  @JSONField(format = "yyyy-MM-dd HH:mm:ss")
  private Date solveTime;

  /**
   * 解决人员
   */
  private String maintainer;

  @ExcelCollection(name = "处理人")
  private List<Student> maintainers;

  /**
   * 是否解决
   */
  @Excel(name = "处理结果",replace = {"已解决_1","未解决_2"})
  private Integer status;

  /**
   * 客户名字
   */
  @Excel(name = "客户名字")
  private String customerName;

  /**
   * 耗材情况
   */
  @ExcelEntity(id = "m",name = "耗材使用情况")
  private Material material;

  /**
   * 具体原因
   */

  @Excel(name = "具体原因")
  private String reason;

  /**
   * 解决方法
   */
  @Excel(name = "解决方法")
  private String solution;


}
